
#ifndef _DSOUND_H_
#define _DSOUND_H_


#ifndef DIRECTSOUND_VERSION
#define DIRECTSOUND_VERSION 0x0700
#endif


#include <dsound.h>
#include <list>

//#include "Global.h"


class CSound
{
public:
	const char*				m_Filename;
	IDirectSoundBuffer*		m_Sound;
	bool					m_bLooping;
};



class CSoundSystem
{
public:
	CSoundSystem();
	~CSoundSystem();

	void	Initialize(HWND hWnd);
	void	SetDefaultPath(LPCSTR path);
	
	CSound* LoadSound(const char*fname);

	void	PlaySound(CSound*);

private:
	IDirectSound*			m_DirectSound;
	IDirectSoundBuffer*		m_Primary;
	std::list<CSound*>		m_SoundList;
	const char*				m_Path;
};


extern CSoundSystem soundsystem;

#endif